num = 0
n = eval(input())
for n in range(2, n + 1):
    for i in range(2, n):
        if n % i == 0:
            break
        else:
            print("%2d" % n, end=" ")
            num = num + 1

print("num=" + str(num))
